<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>  
<!DOCTYPE html>
<html>
<head>
<title>系统日志管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="decorator" content="default" />
<%@ include file="/WEB-INF/views/include/bootstrap-table.jsp"%>
    
</head>



<body class="console-frame-body">
	<div class="layui-fluid">
		<div class="layui-tab layui-tab-brief" >
			<div class="layui-row">
				<div class="console-elem-quote">
	                <form id="toolBranchQueryForm" class="layui-form layui-form-pane" action="">
	                    <div class="layui-form-item">
	                    	<div class="layui-inline">
	                            <label class="layui-form-label">用户帐号</label>
	                            <div class="layui-input-inline">
	                                <input id="loginName" class="layui-input" type="text">
	                            </div>
	                        </div>
	                        <div class="layui-inline">
	                            <label class="layui-form-label">开始时间</label>
	                            <div class="layui-input-inline">
	                                <input id="beginDate" name="startTime" type="text" readonly="readonly" maxlength="20" class="layui-input dateInput" cssClass="layui-input dateInput"
										value="<fmt:formatDate value="${stdMain.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
										onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" placeholder="请输入开始时间"/>
	                            </div>
	                        </div>
	                    	<div class="layui-inline">
	                            <label class="layui-form-label">结束时间</label>
	                            <div class="layui-input-inline">
	                                <input id="endDate" name="endTime" type="text" readonly="readonly" maxlength="20" class="layui-input dateInput" cssClass="layui-input dateInput"
										value="<fmt:formatDate value="${stdMain.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
										onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" placeholder="请输入结束时间"/>
	                            </div>
	                        </div>
	                    </div>
	                    <div class="layui-form-item">
	                        <a id="btn_search" class="layui-btn search_btn">查询</a>
	                        <button type="reset" onclick="doResetBysearch();" class="layui-btn layui-btn-primary">重置</button>
	                    </div>
	                </form>
	            </div>
	            <%-- <button type="button" class="btn-custom" onclick="exportData('${ctx}/sys/log/export',this)">导出</button> --%>
	            <div style="width:calc(100% - 50px); ">
	                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;margin-bottom:0px;">
	                    <legend>用户登录分析表</legend>
	                </fieldset>
	            </div>
				
			<div class="list_mode mode">
			
		    <table id="table" 
		         data-toggle="table" 
		         data-url="${ctx}/sys/log/logListJson"
		         data-toolbar="#toolbar"
			     data-height="${dataHeight491}" 
			     data-maintain-selected="true" 
			     data-side-pagination="server"
			     data-click-to-select="true" 
			     data-pagination="true" 
			     data-single-select="false"
			     data-id-field="id"
			     data-query-params="doQuery"
			     data-cache="false"
			     data-show-columns="false"
			     data-page-list="${dataPageList}">
			<thead>
				<tr>
			    	<!-- 属性 data-visible="false" 可以隐藏列 -->
			    	<!-- 属性data-sortable="true" 可以列排序 -->
					<th data-checkbox="true"></th>
					<th data-field="title">操作</th>
					<th data-field="createUser">操作用户</th>
					<th data-field="loginName">操作帐号</th>
					<th data-field="remoteAddr">操作者IP</th>
					<th data-field="createDate">操作时间</th>
					<th data-field="createCompany" data-visible="false">所在公司</th>
					<th data-field="createDepart" data-visible="false">所在部门</th>
					<th data-field="requestUri" data-visible="false">URI</th>
					<th data-field="method" data-visible="false">提交方式</th>
				</tr>
			</thead>
		    </table>
		    </div>
		    </div>
	    </div>
	</div>
	
	<script type="text/javascript">
	  var $table = $('#table');
	  $(function () { 
          
	      $("#btn_search").click(function () { 
	              $table.bootstrapTable('refresh'); 
	       }); 
	   }); 
	  
	  //查询函数
	  function doQuery(params) {
		  params.searchType = "${param.type}";						
		  params.loginName = $("#loginName").val();
		  params.beginDate = $("#beginDate").val();
		  params.endDate = $("#endDate").val();
		 
		  return params;
	  }
	  
	
	</script>
	
	<jsp:include page="/WEB-INF/views/include/pageJs.jsp" />
</body>
</html>


